Ext.onReady(function(){ 
	Ext.QuickTips.init();
	Ext.form.Field.prototype.msgTarget = 'under';
	
	var sm = new Ext.grid.CheckboxSelectionModel();

	var cm1=new Ext.grid.ColumnModel([ 
	sm,
	new Ext.grid.RowNumberer({header: "编号",width:40}),
	{header:'客户ID',dataIndex:'custId',hidden:true},
	{header:'客户名称',dataIndex:'custName',width:120},
	{header:'客户类型',dataIndex:'custType',width:120},
	{header:'客户规模',dataIndex:'custScope',width:120},
	{header:'所属行业',dataIndex:'industryType',width:120},
	{header:'所属机构',dataIndex:'inputOrgId',width:120},
	{header:'信用等级',dataIndex:'creditLevel',width:120},
	{header:'风险暴露分类',dataIndex:'exposureType',width:120},
	{header:'违约状态',dataIndex:'defaultStat',width:120},

	{header:'流动比率',dataIndex:'FR001',width:120,hidden:true},
	{header:'速动比率',dataIndex:'FR002',width:120,hidden:true},
	{header:'现金比率',dataIndex:'FR003',width:120,hidden:true},
	{header:'现金流动负债比率',dataIndex:'FR004',width:120,hidden:true},
	{header:'现金到期债务比',dataIndex:'FR005',width:120,hidden:true},
	{header:'净负债率',dataIndex:'FR006',width:120,hidden:true},
	{header:'全部资本化比率',dataIndex:'FR007',width:120,hidden:true},
	{header:'资产负债率',dataIndex:'FR008',width:120,hidden:true},
	{header:'长期资本负债率',dataIndex:'FR009',width:120,hidden:true},
	{header:'有形净值与债务比率',dataIndex:'FR010',width:120,hidden:true},
	{header:'利息保障倍数',dataIndex:'FR011',width:120,hidden:true},
	{header:'偿债覆盖比率',dataIndex:'FR012',width:120,hidden:true},
	{header:'现金利息保障倍数',dataIndex:'FR013',width:120,hidden:true},
	{header:'收入利息保障倍数',dataIndex:'FR014',width:120,hidden:true},
	{header:'利润债务保障倍数',dataIndex:'FR015',width:120,hidden:true},
	{header:'单位资产长期负债',dataIndex:'FR016',width:120,hidden:true},
	{header:'非流动负债与收入比率',dataIndex:'FR017',width:120,hidden:true},
	{header:'应收账款负债率',dataIndex:'FR018',width:120,hidden:true},
	{header:'长期负债权益比率',dataIndex:'FR019',width:120,hidden:true},
	{header:'收入与非流动负债比',dataIndex:'FR020',width:120,hidden:true},
	{header:'收入负债比',dataIndex:'FR021',width:120,hidden:true},
	{header:'应收账款周转率',dataIndex:'FR022',width:120,hidden:true},
	{header:'存货周转率',dataIndex:'FR023',width:120,hidden:true},
	{header:'流动资产周转率',dataIndex:'FR024',width:120,hidden:true},
	{header:'固定资产周转率',dataIndex:'FR025',width:120,hidden:true},
	{header:'总资产周转率',dataIndex:'FR026',width:120,hidden:true},
	{header:'资产现金回收率',dataIndex:'FR027',width:120,hidden:true},
	{header:'应付账款周转率',dataIndex:'FR028',width:120,hidden:true},
	{header:'营运资本周转期',dataIndex:'FR029',width:120,hidden:true},
	{header:'总资产回报率',dataIndex:'FR030',width:120,hidden:true},
	{header:'长期资金报酬率',dataIndex:'FR031',width:120,hidden:true},
	{header:'净资产报酬率',dataIndex:'FR032',width:120,hidden:true},
	{header:'销售利润率',dataIndex:'FR033',width:120,hidden:true},
	{header:'成本费用利润率',dataIndex:'FR034',width:120,hidden:true},
	{header:'资本收益率',dataIndex:'FR035',width:120,hidden:true},
	{header:'主营业务净利率',dataIndex:'FR036',width:120,hidden:true},
	{header:'折旧摊销覆盖率',dataIndex:'FR037',width:120,hidden:true},
	{header:'息税前利润率',dataIndex:'FR038',width:120,hidden:true},
	{header:'单位资产利润',dataIndex:'FR039',width:120,hidden:true},
	{header:'单位资产留存收益',dataIndex:'FR040',width:120,hidden:true},
	{header:'净资产利润率',dataIndex:'FR041',width:120,hidden:true},
	{header:'经营利润与营运资金比率',dataIndex:'FR042',width:120,hidden:true},
	{header:'流动负债偿付比率a',dataIndex:'FR043',width:120,hidden:true},
	{header:'流动负债偿付比率b',dataIndex:'FR044',width:120,hidden:true},
	{header:'流动负债偿付比率c',dataIndex:'FR045',width:120,hidden:true},
	{header:'流动负债偿付比率d',dataIndex:'FR046',width:120,hidden:true},
	{header:'应收账款流动负债率',dataIndex:'FR047',width:120,hidden:true},
	{header:'速动资产负债率',dataIndex:'FR048',width:120,hidden:true},
	{header:'主营业务收入净额规模',dataIndex:'FR049',width:120,hidden:true},
	{header:'资产总计规模',dataIndex:'FR050',width:120,hidden:true},
	{header:'所有者权益合计规模',dataIndex:'FR051',width:120,hidden:true},
	{header:'平均主营业务收入净额规模',dataIndex:'FR052',width:120,hidden:true},
	{header:'平均资产总计规模',dataIndex:'FR053',width:120,hidden:true},
	{header:'平均所有者权益合计规模',dataIndex:'FR054',width:120,hidden:true},
	{header:'长期资产适合率',dataIndex:'FR055',width:120,hidden:true},
	{header:'付息债务结构比',dataIndex:'FR056',width:120,hidden:true},
	{header:'流动负债结构比',dataIndex:'FR057',width:120,hidden:true},
	{header:'应付账款负债比',dataIndex:'FR058',width:120,hidden:true},
	{header:'有形资本净值与长期负债比',dataIndex:'FR059',width:120,hidden:true},
	{header:'应收账款与总资产比率',dataIndex:'FR060',width:120,hidden:true},
	{header:'存货与总资产比率',dataIndex:'FR061',width:120,hidden:true},
	{header:'资本固定化比率',dataIndex:'FR062',width:120,hidden:true},
	{header:'财务费用占借款比率',dataIndex:'FR063',width:120,hidden:true},
	{header:'资本充足率',dataIndex:'FR064',width:120,hidden:true},
	{header:'长期资金适合率',dataIndex:'FR065',width:120,hidden:true},
	{header:'业务费用与存货比率',dataIndex:'FR066',width:120,hidden:true},
	{header:'存货与流动资产比率',dataIndex:'FR067',width:120,hidden:true},
	{header:'净资产与年末贷款余额比率',dataIndex:'FR068',width:120,hidden:true},
	{header:'主营业务收入增长率',dataIndex:'FR069',width:120,hidden:true},
	{header:'总资产增长比率',dataIndex:'FR070',width:120,hidden:true},
	{header:'资本积累率',dataIndex:'FR071',width:120,hidden:true},
	{header:'净利润增长率',dataIndex:'FR072',width:120,hidden:true},
	{header:'总负债增长率',dataIndex:'FR073',width:120,hidden:true},
	{header:'流动负债增长率',dataIndex:'FR074',width:120,hidden:true},
	{header:'长期负债增长率',dataIndex:'FR075',width:120,hidden:true},
	{header:'主营业务经营利润增长率',dataIndex:'FR076',width:120,hidden:true},
	{header:'主营业务毛利增长率',dataIndex:'FR077',width:120,hidden:true},
	{header:'应收账款周转天数',dataIndex:'FR078',width:120,hidden:true},
	{header:'应付账款周转天数',dataIndex:'FR079',width:120,hidden:true},
	{header:'存货周转天数',dataIndex:'FR080',width:120,hidden:true},
	{header:'总资产周转天数',dataIndex:'FR081',width:120,hidden:true},
	{header:'有息负债权益比',dataIndex:'FR082',width:120,hidden:true},
	{header:'销售毛利率',dataIndex:'FR083',width:120,hidden:true},

	{header:'总收入(百万)',dataIndex:'PFR001',width:120,hidden:true},
	{header:'总收入增长率',dataIndex:'PFR002',width:120,hidden:true},
	{header:'经费自给率',dataIndex:'PFR003',width:120,hidden:true},
	{header:'收支比率',dataIndex:'PFR004',width:120,hidden:true},
	{header:'收支结余率',dataIndex:'PFR005',width:120,hidden:true},
	{header:'偿债率',dataIndex:'PFR006',width:120,hidden:true},
	{header:'负债收入比率',dataIndex:'PFR007',width:120,hidden:true},

	{header:'不良贷款率',dataIndex:'FFR001',width:120,hidden:true},
	{header:'拨备覆盖率',dataIndex:'FFR002',width:120,hidden:true},
	{header:'还原后的不良贷款率',dataIndex:'FFR003',width:120,hidden:true},
	{header:'不良贷款率变动率',dataIndex:'FFR004',width:120,hidden:true},
	{header:'总资产收益率',dataIndex:'FFR005',width:120,hidden:true},
	{header:'成本收入比',dataIndex:'FFR006',width:120,hidden:true},
	{header:'净资产收益率',dataIndex:'FFR007',width:120,hidden:true},
	{header:'中间业务收入占比',dataIndex:'FFR008',width:120,hidden:true},
	{header:'净利润',dataIndex:'FFR009',width:120,hidden:true},
	{header:'网均收入',dataIndex:'FFR010',width:120,hidden:true},
	{header:'核心资本充足率',dataIndex:'FFR011',width:120,hidden:true},
	{header:'资本充足率',dataIndex:'FFR012',width:120,hidden:true},
	{header:'流动性比率',dataIndex:'FFR013',width:120,hidden:true},
	{header:'存贷比',dataIndex:'FFR014',width:120,hidden:true},
	{header:'主动融资比率',dataIndex:'FFR015',width:120,hidden:true},
	{header:'行际比率',dataIndex:'FFR016',width:120,hidden:true},
	{header:'总资产',dataIndex:'FFR017',width:120,hidden:true},
	{header:'股东权益',dataIndex:'FFR018',width:120,hidden:true},
	{header:'营业收入增长率',dataIndex:'FFR019',width:120,hidden:true},
	{header:'总资产增长率',dataIndex:'FFR020',width:120,hidden:true},
	{header:'内部资本增长率',dataIndex:'FFR021',width:120,hidden:true},

	{header:'流动比率',dataIndex:'SFR001',width:120,hidden:true},
	{header:'速动比率',dataIndex:'SFR002',width:120,hidden:true},
	{header:'现金比率',dataIndex:'SFR003',width:120,hidden:true},
	{header:'现金流动负债比率b',dataIndex:'SFR004',width:120,hidden:true},
	{header:'现金到期债务比',dataIndex:'SFR005',width:120,hidden:true},
	{header:'净负债率',dataIndex:'SFR006',width:120,hidden:true},
	{header:'全部资本化比率',dataIndex:'SFR007',width:120,hidden:true},
	{header:'资产负债率',dataIndex:'SFR008',width:120,hidden:true},
	{header:'长期资本负债率',dataIndex:'SFR009',width:120,hidden:true},
	{header:'有形净值与债务比率',dataIndex:'SFR010',width:120,hidden:true},
	{header:'利息保障倍数',dataIndex:'SFR011',width:120,hidden:true},
	{header:'偿债覆盖比率',dataIndex:'SFR012',width:120,hidden:true},
	{header:'现金利息保障倍数',dataIndex:'SFR013',width:120,hidden:true},
	{header:'收入利息保障倍数',dataIndex:'SFR014',width:120,hidden:true},
	{header:'利润债务保障倍数',dataIndex:'SFR015',width:120,hidden:true},
	{header:'单位资产长期负债',dataIndex:'SFR016',width:120,hidden:true},
	{header:'非流动负债与收入比率',dataIndex:'SFR017',width:120,hidden:true},
	{header:'应收账款负债率',dataIndex:'SFR018',width:120,hidden:true},
	{header:'长期负债权益比率',dataIndex:'SFR019',width:120,hidden:true},
	{header:'收入与非流动负债比',dataIndex:'SFR020',width:120,hidden:true},
	{header:'收入负债比',dataIndex:'SFR021',width:120,hidden:true},
	{header:'应收账款周转率',dataIndex:'SFR022',width:120,hidden:true},
	{header:'存货周转率',dataIndex:'SFR023',width:120,hidden:true},
	{header:'流动资产周转率',dataIndex:'SFR024',width:120,hidden:true},
	{header:'固定资产周转率',dataIndex:'SFR025',width:120,hidden:true},
	{header:'总资产周转率',dataIndex:'SFR026',width:120,hidden:true},
	{header:'资产现金回收率',dataIndex:'SFR027',width:120,hidden:true},
	{header:'应付账款周转率',dataIndex:'SFR028',width:120,hidden:true},
	{header:'营运资本周转期',dataIndex:'SFR029',width:120,hidden:true},
	{header:'总资产回报率',dataIndex:'SFR030',width:120,hidden:true},
	{header:'长期资金报酬率',dataIndex:'SFR031',width:120,hidden:true},
	{header:'净资产报酬率',dataIndex:'SFR032',width:120,hidden:true},
	{header:'销售利润率',dataIndex:'SFR033',width:120,hidden:true},
	{header:'成本费用利润率',dataIndex:'SFR034',width:120,hidden:true},
	{header:'资本收益率',dataIndex:'SFR035',width:120,hidden:true},
	{header:'主营业务净利率',dataIndex:'SFR036',width:120,hidden:true},
	{header:'折旧摊销覆盖率',dataIndex:'SFR037',width:120,hidden:true},
	{header:'息税前利润率',dataIndex:'SFR038',width:120,hidden:true},
	{header:'单位资产利润',dataIndex:'SFR039',width:120,hidden:true},
	{header:'单位资产留存收益',dataIndex:'SFR040',width:120,hidden:true},
	{header:'净资产利润率',dataIndex:'SFR041',width:120,hidden:true},
	{header:'经营利润与营运资金比率',dataIndex:'SFR042',width:120,hidden:true},
	{header:'流动负债偿付比率a',dataIndex:'SFR043',width:120,hidden:true},
	{header:'流动负债偿付比率b',dataIndex:'SFR044',width:120,hidden:true},
	{header:'流动负债偿付比率c',dataIndex:'SFR045',width:120,hidden:true},
	{header:'流动负债偿付比率d',dataIndex:'SFR046',width:120,hidden:true},
	{header:'应收账款流动负债率',dataIndex:'SFR047',width:120,hidden:true},
	{header:'速动资产负债率',dataIndex:'SFR048',width:120,hidden:true},
	{header:'主营业务收入净额规模',dataIndex:'SFR049',width:120,hidden:true},
	{header:'资产总计规模',dataIndex:'SFR050',width:120,hidden:true},
	{header:'所有者权益合计规模',dataIndex:'SFR051',width:120,hidden:true},
	{header:'平均主营业务收入净额规模',dataIndex:'SFR052',width:120,hidden:true},
	{header:'平均资产总计规模',dataIndex:'SFR053',width:120,hidden:true},
	{header:'平均所有者权益合计规模',dataIndex:'SFR054',width:120,hidden:true},
	{header:'长期资产适合率',dataIndex:'SFR055',width:120,hidden:true},
	{header:'付息债务结构比',dataIndex:'SFR056',width:120,hidden:true},
	{header:'流动负债结构比',dataIndex:'SFR057',width:120,hidden:true},
	{header:'应付账款负债比',dataIndex:'SFR058',width:120,hidden:true},
	{header:'有形资本净值与长期负债比',dataIndex:'SFR059',width:120,hidden:true},
	{header:'应收账款与总资产比率',dataIndex:'SFR060',width:120,hidden:true},
	{header:'存货与总资产比率',dataIndex:'SFR061',width:120,hidden:true},
	{header:'资本固定化比率',dataIndex:'SFR062',width:120,hidden:true},
	{header:'财务费用占借款比率',dataIndex:'SFR063',width:120,hidden:true},
	{header:'资本充足率',dataIndex:'SFR064',width:120,hidden:true},
	{header:'长期资金适合率',dataIndex:'SFR065',width:120,hidden:true},
	{header:'业务费用与存货比率',dataIndex:'SFR066',width:120,hidden:true},
	{header:'存货与流动资产比率',dataIndex:'SFR067',width:120,hidden:true},
	{header:'净资产与年末贷款余额比率',dataIndex:'SFR068',width:120,hidden:true},
	{header:'主营业务收入增长率',dataIndex:'SFR069',width:120,hidden:true},
	{header:'总资产增长比率',dataIndex:'SFR070',width:120,hidden:true},
	{header:'资本积累率',dataIndex:'SFR071',width:120,hidden:true},
	{header:'净利润增长率',dataIndex:'SFR072',width:120,hidden:true},
	{header:'总负债增长率',dataIndex:'SFR073',width:120,hidden:true},
	{header:'流动负债增长率',dataIndex:'SFR074',width:120,hidden:true},
	{header:'长期负债增长率',dataIndex:'SFR075',width:120,hidden:true},
	{header:'主营业务经营利润增长率',dataIndex:'SFR076',width:120,hidden:true},
	{header:'应收账款周转天数',dataIndex:'SFR078',width:120,hidden:true},
	{header:'应付账款周转天数',dataIndex:'SFR079',width:120,hidden:true},
	{header:'存货周转天数',dataIndex:'SFR080',width:120,hidden:true},
	{header:'总资产周转天数',dataIndex:'SFR081',width:120,hidden:true},
	{header:'有息负债权益比',dataIndex:'SFR082',width:120,hidden:true},
	{header:'销售毛利率',dataIndex:'SFR083',width:120,hidden:true}
 
	]); 
	var ds=new Ext.data.Store({ 
					reader:new Ext.data.JsonReader({ },[
					{name:'custId'},
					{name:'custName'}, 
					{name:'custType'}, 
					{name:'custScope'}, 
					{name:'industryType'},
					{name:'inputOrgId'}, 
					{name:'creditLevel'}, 
					{name:'exposureType'}, 
					{name:'defaultStat'},
					{name:'FR001'},{name:'FR002'},{name:'FR003'},{name:'FR004'},{name:'FR005'},{name:'FR006'},{name:'FR007'},{name:'FR008'},{name:'FR009'},{name:'FR010'},{name:'FR011'},{name:'FR012'},{name:'FR013'},{name:'FR014'},{name:'FR015'},{name:'FR016'},{name:'FR017'},{name:'FR018'},{name:'FR019'},{name:'FR020'},{name:'FR021'},{name:'FR022'},{name:'FR023'},{name:'FR024'},{name:'FR025'},{name:'FR026'},{name:'FR027'},{name:'FR028'},{name:'FR029'},{name:'FR030'},{name:'FR031'},{name:'FR032'},{name:'FR033'},{name:'FR034'},{name:'FR035'},{name:'FR036'},{name:'FR037'},{name:'FR038'},{name:'FR039'},{name:'FR040'},{name:'FR041'},{name:'FR042'},{name:'FR043'},{name:'FR044'},{name:'FR045'},{name:'FR046'},{name:'FR047'},{name:'FR048'},{name:'FR049'},{name:'FR050'},{name:'FR051'},{name:'FR052'},{name:'FR053'},{name:'FR054'},{name:'FR055'},{name:'FR056'},{name:'FR057'},{name:'FR058'},{name:'FR059'},{name:'FR060'},{name:'FR061'},{name:'FR062'},{name:'FR063'},{name:'FR064'},{name:'FR065'},{name:'FR066'},{name:'FR067'},{name:'FR068'},{name:'FR069'},{name:'FR070'},{name:'FR071'},{name:'FR072'},{name:'FR073'},{name:'FR074'},{name:'FR075'},{name:'FR076'},{name:'FR077'},{name:'FR078'},{name:'FR079'},{name:'FR080'},{name:'FR081'},{name:'FR082'},{name:'FR083'},
					{name:'PFR001'},{name:'PFR002'},{name:'PFR003'},{name:'PFR004'},{name:'PFR005'},{name:'PFR006'},{name:'PFR007'},
					{name:'FFR001'},{name:'FFR002'},{name:'FFR003'},{name:'FFR004'},{name:'FFR005'},{name:'FFR006'},{name:'FFR007'},{name:'FFR008'},{name:'FFR009'},{name:'FFR010'},{name:'FFR011'},{name:'FFR012'},{name:'FFR013'},{name:'FFR014'},{name:'FFR015'},{name:'FFR016'},{name:'FFR017'},{name:'FFR018'},{name:'FFR019'},{name:'FFR020'},{name:'FFR021'},
					{name:'SFR001'},{name:'SFR002'},{name:'SFR003'},{name:'SFR004'},{name:'SFR005'},{name:'SFR006'},{name:'SFR007'},{name:'SFR008'},{name:'SFR009'},{name:'SFR010'},{name:'SFR011'},{name:'SFR012'},{name:'SFR013'},{name:'SFR014'},{name:'SFR015'},{name:'SFR016'},{name:'SFR017'},{name:'SFR018'},{name:'SFR019'},{name:'SFR020'},{name:'SFR021'},{name:'SFR022'},{name:'SFR023'},{name:'SFR024'},{name:'SFR025'},{name:'SFR026'},{name:'SFR027'},{name:'SFR028'},{name:'SFR029'},{name:'SFR030'},{name:'SFR031'},{name:'SFR032'},{name:'SFR033'},{name:'SFR034'},{name:'SFR035'},{name:'SFR036'},{name:'SFR037'},{name:'SFR038'},{name:'SFR039'},{name:'SFR040'},{name:'SFR041'},{name:'SFR042'},{name:'SFR043'},{name:'SFR044'},{name:'SFR045'},{name:'SFR046'},{name:'SFR047'},{name:'SFR048'},{name:'SFR049'},{name:'SFR050'},{name:'SFR051'},{name:'SFR052'},{name:'SFR053'},{name:'SFR054'},{name:'SFR055'},{name:'SFR056'},{name:'SFR057'},{name:'SFR058'},{name:'SFR059'},{name:'SFR060'},{name:'SFR061'},{name:'SFR062'},{name:'SFR063'},{name:'SFR064'},{name:'SFR065'},{name:'SFR066'},{name:'SFR067'},{name:'SFR068'},{name:'SFR069'},{name:'SFR070'},{name:'SFR071'},{name:'SFR072'},{name:'SFR073'},{name:'SFR074'},{name:'SFR075'},{name:'SFR076'},{name:'SFR078'},{name:'SFR079'},{name:'SFR080'},{name:'SFR081'},{name:'SFR082'},{name:'SFR083'},
					]) 
	});

	var custTypeStore = new Ext.data.Store({ 
		proxy:new Ext.data.HttpProxy({
		url:'showType.do?type=QueryCustType',
		method:'GET'
		}), 
		reader:new Ext.data.JsonReader({ },[
		{name:'name'}, 
		{name:'code'}
		]),
		
		});
	custTypeStore.load(
//	{
//		callback:function(r,options,success){
//		var custTypeString = document.getElementById('custTypeString').innerHTML;
//		var custScopeString = document.getElementById("custScopeString").innerHTML;
//		var custType ;
//		if(custTypeString == '企业法人'){
//			if(custScopeString == '01'|| custScopeString == '02')custType = '04';
//			else custType = '01';
//		}
//		else if(custTypeString == '事业单位')custType = '02';
//		else if(custTypeString == '金融同业') custType = '03';
//		Ext.getCmp("custType").setValue(custType);
//	}}
	);

		var defaultStatStore = new Ext.data.Store({ 
			proxy:new Ext.data.HttpProxy({
			url:'showType.do?type=DefaultStat',
			method:'GET'
			}), 
			reader:new Ext.data.JsonReader({ },[
			{name:'name'}, 
			{name:'code'}
			]) 
			});

		var custScopeStore = new Ext.data.Store({ 
			proxy:new Ext.data.HttpProxy({
			url:'showType.do?type=CustScope',
			method:'GET'
			}), 
			reader:new Ext.data.JsonReader({ },[
			{name:'name'}, 
			{name:'code'}
			]) 
		});

		var addIndustryTypeLevelOneStore=new Ext.data.Store({ 
			proxy:new Ext.data.HttpProxy({
			url:'showIndustryTypeLevelOne.do',
			method:'GET'
			}), 
			reader:new Ext.data.JsonReader({ },[
			{name:'name'}, 
			{name:'code'}
			]) ,
			autoLoad:true
			}); 

		var addIndustryTypeLevelTwoStore=new Ext.data.Store({  
			reader:new Ext.data.JsonReader({ },[
			{name:'name'}, 
			{name:'code'}
			])
			}); 
			
		var exposureTypeStore = new Ext.data.Store({ 
			proxy:new Ext.data.HttpProxy({
			url:'showType.do?type=ExposureType',
			method:'GET'
			}), 
			reader:new Ext.data.JsonReader({ },[
			{name:'name'}, 
			{name:'code'}
			]) 
		});
		var pdValueStore = new Ext.data.Store({ 
			proxy:new Ext.data.HttpProxy({
			url:'showType.do?type=PDValue',
			method:'GET'
			}), 
			reader:new Ext.data.JsonReader({ },[
			{name:'name'}, 
			{name:'code'}
			]) 
		});

		var orgTypeStore = new Ext.data.Store({ 
			proxy:new Ext.data.HttpProxy({
			url:'showType.do?type=OrgType',
			method:'GET'
			}), 
			reader:new Ext.data.JsonReader({ },[
			{name:'name'}, 
			{name:'code'}
			]) 
		});

		var grid=new Ext.grid.GridPanel({ 
			bodyStyle: 'padding:5px',
			id:'myCustomers',
			renderTo:'result_panel',
			stripeRows:true,//斑马线效果
			title:"查询结果列表", 
			height:500, 
			cm:cm1,
			store: ds, 
			loadMask: { msg: "加载中..." }, 
			viewConfig: {   
			                            forceFit:true   
			            },   
			            bbar: new Ext.PagingToolbar({   
			                pageSize: 20,   
			                store: ds,   
			                displayInfo: true,   
			                displayMsg: '第{0} 到 {1} 条数据 共{2}条',   
			                emptyMsg: "没有数据"   
			            }) ,
			            tbar: [
			                   {text:'导出Excel',handler:exportExcel},
			                   ] ,
			});
		
		addForm01 = new Ext.form.FormPanel({ 
			id: 'addFormEnter', 
			width: 860, 
			height: 700, 
			//样式 
			bodyStyle: 'margin:3px 3px 3px 3px', 
			frame: true, 
			xtype: 'filedset', 
			labelWidth: 120, 
			items: 
			[ {     
		        layout : 'column',     
		        items : [{     
		            columnWidth : .5 ,
		            xtype:'label',
		            html:'<div style="font-weight:bold;font-size:14px;margin-top:10px;">营运能力:</div>',
		        }]
			},{     
		        layout : 'column',     
		        items : [ 
		        {columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '流动比率',name : 'FR001',inputValue :1,checked : false})]}, 
		        {columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '速动比率',name : 'FR002',inputValue :1,checked : false})]}, 
		        {columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '现金比率',name : 'FR003',inputValue :1,checked : false})]}, 
		        {columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '现金流动负债比率',name : 'FR004',inputValue :1,checked : false})]}, 
		        {columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '现金到期债务比',name : 'FR005',inputValue :1,checked : false})]}, 
		        {columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '净负债率',name : 'FR006',inputValue :1,checked : false})]}, 
		        {columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '全部资本化比率',name : 'FR007',inputValue :1,checked : false})]}, 
		        
		        
		        ]     
		    },{     
		        layout : 'column',     
		        items : [{     
		            columnWidth : .5 ,
		            xtype:'label',
		            html:'<div style="font-weight:bold;font-size:14px;margin-top:10px;">长期偿债能力:</div>',
		        }]
			},{     
		        layout : 'column',     
		        items : [ 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '资产负债率',name : 'FR008',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '长期资本负债率',name : 'FR009',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '有形净值与债务比率',name : 'FR010',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '利息保障倍数',name : 'FR011',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '偿债覆盖比率',name : 'FR012',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '现金利息保障倍数',name : 'FR013',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '收入利息保障倍数',name : 'FR014',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '利润债务保障倍数',name : 'FR015',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '单位资产长期负债',name : 'FR016',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '非流动负债与收入比率',name : 'FR017',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '应收账款负债率',name : 'FR018',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '长期负债权益比率',name : 'FR019',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '收入与非流动负债比',name : 'FR020',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '收入负债比',name : 'FR021',inputValue :1,checked : false})]},  
			        {columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '有息负债权益比',name : 'FR082',inputValue :1,checked : false})]},

		         ]
			},
		                  
		     {     
		        layout : 'column',     
		        items : [{     
		            columnWidth : .5 ,
		            xtype:'label',
		            html:'<div style="font-weight:bold;font-size:14px;margin-top:10px;">营运能力:</div>',
		        }]
			},{     
		        layout : 'column',     
		        items : [ 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '应收账款周转率',name : 'FR022',inputValue :1,checked : false})]},
			        {columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '应收账款周转天数',name : 'FR078',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '应付账款周转率',name : 'FR028',inputValue :1,checked : false})]},
			        {columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '应付账款周转天数',name : 'FR079',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '存货周转率',name : 'FR023',inputValue :1,checked : false})]},    
			        {columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '存货周转天数',name : 'FR080',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '流动资产周转率',name : 'FR024',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '固定资产周转率',name : 'FR025',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '总资产周转率',name : 'FR026',inputValue :1,checked : false})]},
			        {columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '总资产周转天数',name : 'FR081',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '资产现金回收率',name : 'FR027',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '营运资本周转期',name : 'FR029',inputValue :1,checked : false})]}, 

		         ]
			},{     
		        layout : 'column',     
		        items : [{     
		            columnWidth : .5 ,
		            xtype:'label',
		            html:'<div style="font-weight:bold;font-size:14px;margin-top:10px;">盈利能力:</div>',
		        }]
			},{     
		        layout : 'column',     
		        items : [ 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '总资产回报率',name : 'FR030',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '长期资金报酬率',name : 'FR031',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '净资产报酬率',name : 'FR032',inputValue :1,checked : false})]},
			        {columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '销售毛利率',name : 'FR083',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '销售利润率',name : 'FR033',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '成本费用利润率',name : 'FR034',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '资本收益率',name : 'FR035',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '主营业务净利率',name : 'FR036',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '折旧摊销覆盖率',name : 'FR037',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '息税前利润率',name : 'FR038',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '单位资产利润',name : 'FR039',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '单位资产留存收益',name : 'FR040',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '净资产利润率',name : 'FR041',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '经营利润与营运资金比率',name : 'FR042',inputValue :1,checked : false})]}, 

		         ]
			},{     
		        layout : 'column',     
		        items : [{     
		            columnWidth : .5 ,
		            xtype:'label',
		            html:'<div style="font-weight:bold;font-size:14px;margin-top:10px;">营运能力:</div>',
		        }]
			},{     
		        layout : 'column',     
		        items : [ 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '流动负债偿付比率a',name : 'FR043',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '流动负债偿付比率b',name : 'FR044',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '流动负债偿付比率c',name : 'FR045',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '流动负债偿付比率d',name : 'FR046',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '应收账款流动负债率',name : 'FR047',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '速动资产负债率',name : 'FR048',inputValue :1,checked : false})]}, 

		         ]
			},{     
		        layout : 'column',     
		        items : [{     
		            columnWidth : .5 ,
		            xtype:'label',
		            html:'<div style="font-weight:bold;font-size:14px;margin-top:10px;">规模指标:</div>',
		        }]
			},{     
		        layout : 'column',     
		        items : [ 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '主营业务收入净额规模',name : 'FR049',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '资产总计规模',name : 'FR050',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '所有者权益合计规模',name : 'FR051',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '平均主营业务收入净额规模',name : 'FR052',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '平均资产总计规模',name : 'FR053',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '平均所有者权益合计规模',name : 'FR054',inputValue :1,checked : false})]}, 

		         ]
			},{     
		        layout : 'column',     
		        items : [{     
		            columnWidth : .5 ,
		            xtype:'label',
		            html:'<div style="font-weight:bold;font-size:14px;margin-top:10px;">财务结构:</div>',
		        }]
			},{     
		        layout : 'column',     
		        items : [ 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '长期资产适合率',name : 'FR055',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '付息债务结构比',name : 'FR056',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '流动负债结构比',name : 'FR057',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '应付账款负债比',name : 'FR058',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '有形资本净值与长期负债比',name : 'FR059',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '应收账款与总资产比率',name : 'FR060',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '存货与总资产比率',name : 'FR061',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '资本固定化比率',name : 'FR062',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '财务费用占借款比率',name : 'FR063',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '资本充足率',name : 'FR064',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '长期资金适合率',name : 'FR065',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '业务费用与存货比率',name : 'FR066',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '存货与流动资产比率',name : 'FR067',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '净资产与年末贷款余额比率',name : 'FR068',inputValue :1,checked : false})]}, 

		         ]
			},{     
		        layout : 'column',     
		        items : [{     
		            columnWidth : .5 ,
		            xtype:'label',
		            html:'<div style="font-weight:bold;font-size:14px;margin-top:10px;">成长性:</div>',
		        }]
			},{     
		        layout : 'column',     
		        items : [ 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '主营业务收入增长率',name : 'FR069',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '总资产增长比率',name : 'FR070',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '资本积累率',name : 'FR071',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '净利润增长率',name : 'FR072',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '总负债增长率',name : 'FR073',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '流动负债增长率',name : 'FR074',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '长期负债增长率',name : 'FR075',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '主营业务经营利润增长率',name : 'FR076',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '主营业务毛利增长率',name : 'FR077',inputValue :1,checked : false})]}, 

		         ]
			},
			
			
			
			]});

		addForm02 = new Ext.form.FormPanel({ 
			id: 'addFormPublic', 
			width: 860, 
			height: 150, 
			//样式 
			bodyStyle: 'margin:3px 3px 3px 3px', 
			frame: true, 
			xtype: 'filedset', 
			labelWidth: 120, 
			items: 
			[ {     
		        layout : 'column',     
		        items : [{     
		            columnWidth : .5 ,
		            xtype:'label',
		            html:'<div style="font-weight:bold;font-size:14px;margin-top:10px;">事业单位财务指标:</div>',
		        }]
			},{     
		        layout : 'column',     
		        items : [ 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '总收入(百万)',name : 'PFR001',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '总收入增长率',name : 'PFR002',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '经费自给率',name : 'PFR003',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '收支比率',name : 'PFR004',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '收支结余率',name : 'PFR005',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '偿债率',name : 'PFR006',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '负债收入比率',name : 'PFR007',inputValue :1,checked : false})]}, 

		        
		        
		        ]     
		    },]
		});

		addForm03 = new Ext.form.FormPanel({ 
			id: 'addFormFinan', 
			width: 660, 
			height: 400, 
			//样式 
			bodyStyle: 'margin:3px 3px 3px 3px', 
			frame: true, 
			xtype: 'filedset', 
			labelWidth: 120, 
			items: 
			[ {     
		        layout : 'column',     
		        items : [{     
		            columnWidth : .5 ,
		            xtype:'label',
		            html:'<div style="font-weight:bold;font-size:14px;margin-top:10px;">资产质量:</div>',
		        }]
			},{     
		        layout : 'column',     
		        items : [ 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '不良贷款率',name : 'FFR001',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '拨备覆盖率',name : 'FFR002',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '还原后的不良贷款率',name : 'FFR003',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '不良贷款率变动率',name : 'FFR004',inputValue :1,checked : false})]}, 


		        
		        
		        ]     
		    },{     
		        layout : 'column',     
		        items : [{     
		            columnWidth : .5 ,
		            xtype:'label',
		            html:'<div style="font-weight:bold;font-size:14px;margin-top:10px;">盈利能力:</div>',
		        }]
			},{     
		        layout : 'column',     
		        items : [ 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '总资产收益率',name : 'FFR005',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '成本收入比',name : 'FFR006',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '净资产收益率',name : 'FFR007',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '中间业务收入占比',name : 'FFR008',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '净利润',name : 'FFR009',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '网均收入',name : 'FFR010',inputValue :1,checked : false})]}, 


		        
		        
		        ]     
		    },{     
		        layout : 'column',     
		        items : [{     
		            columnWidth : .5 ,
		            xtype:'label',
		            html:'<div style="font-weight:bold;font-size:14px;margin-top:10px;">资本充足率:</div>',
		        }]
			},{     
		        layout : 'column',     
		        items : [ 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '核心资本充足率',name : 'FFR011',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '资本充足率',name : 'FFR012',inputValue :1,checked : false})]}, 


		        
		        
		        ]     
		    },{     
		        layout : 'column',     
		        items : [{     
		            columnWidth : .5 ,
		            xtype:'label',
		            html:'<div style="font-weight:bold;font-size:14px;margin-top:10px;">流动性:</div>',
		        }]
			},{     
		        layout : 'column',     
		        items : [ 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '流动性比率',name : 'FFR013',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '存贷比',name : 'FFR014',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '主动融资比率',name : 'FFR015',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '行际比率',name : 'FFR016',inputValue :1,checked : false})]}, 


		        
		        
		        ]     
		    },{     
		        layout : 'column',     
		        items : [{     
		            columnWidth : .5 ,
		            xtype:'label',
		            html:'<div style="font-weight:bold;font-size:14px;margin-top:10px;">规模:</div>',
		        }]
			},{     
		        layout : 'column',     
		        items : [ 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '总资产',name : 'FFR017',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '股东权益',name : 'FFR018',inputValue :1,checked : false})]}, 


		        
		        
		        ]     
		    },{     
		        layout : 'column',     
		        items : [{     
		            columnWidth : .5 ,
		            xtype:'label',
		            html:'<div style="font-weight:bold;font-size:14px;margin-top:10px;">成长性:</div>',
		        }]
			},{     
		        layout : 'column',     
		        items : [ 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '营业收入增长率',name : 'FFR019',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '总资产增长率',name : 'FFR020',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '内部资本增长率',name : 'FFR021',inputValue :1,checked : false})]}, 


		        
		        
		        ]     
		    },]
		});


		addForm04 = new Ext.form.FormPanel({ 
			id: 'addFormSmall', 
			width: 860, 
			height: 700, 
			//样式 
			bodyStyle: 'margin:3px 3px 3px 3px', 
			frame: true, 
			xtype: 'filedset', 
			labelWidth: 120, 
			items: 
			[ {     
		        layout : 'column',     
		        items : [{     
		            columnWidth : .5 ,
		            xtype:'label',
		            html:'<div style="font-weight:bold;font-size:14px;margin-top:10px;">营运能力:</div>',
		        }]
			},{     
		        layout : 'column',     
		        items : [ 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '流动比率',name : 'SFR001',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '速动比率',name : 'SFR002',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '现金比率',name : 'SFR003',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '现金流动负债比率b',name : 'SFR004',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '现金到期债务比',name : 'SFR005',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '净负债率',name : 'SFR006',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '全部资本化比率',name : 'SFR007',inputValue :1,checked : false})]}, 

		        
		        
		        ]     
		    },{     
		        layout : 'column',     
		        items : [{     
		            columnWidth : .5 ,
		            xtype:'label',
		            html:'<div style="font-weight:bold;font-size:14px;margin-top:10px;">长期偿债能力:</div>',
		        }]
			},{     
		        layout : 'column',     
		        items : [ 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '资产负债率',name : 'SFR008',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '长期资本负债率',name : 'SFR009',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '有形净值与债务比率',name : 'SFR010',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '利息保障倍数',name : 'SFR011',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '偿债覆盖比率',name : 'SFR012',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '现金利息保障倍数',name : 'SFR013',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '收入利息保障倍数',name : 'SFR014',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '利润债务保障倍数',name : 'SFR015',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '单位资产长期负债',name : 'SFR016',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '非流动负债与收入比率',name : 'SFR017',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '应收账款负债率',name : 'SFR018',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '长期负债权益比率',name : 'SFR019',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '收入与非流动负债比',name : 'SFR020',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '收入负债比',name : 'SFR021',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '有息负债权益比',name : 'SFR082',inputValue :1,checked : false})]}, 

		         ]
			},
		                  
		     {     
		        layout : 'column',     
		        items : [{     
		            columnWidth : .5 ,
		            xtype:'label',
		            html:'<div style="font-weight:bold;font-size:14px;margin-top:10px;">营运能力:</div>',
		        }]
			},{     
		        layout : 'column',     
		        items : [ 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '应收账款周转率',name : 'SFR022',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '应收账款周转天数',name : 'SFR078',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '应付账款周转率',name : 'SFR028',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '应付账款周转天数',name : 'SFR079',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '存货周转率',name : 'SFR023',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '存货周转天数',name : 'SFR080',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '流动资产周转率',name : 'SFR024',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '固定资产周转率',name : 'SFR025',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '总资产周转率',name : 'SFR026',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '总资产周转天数',name : 'SFR081',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '资产现金回收率',name : 'SFR027',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '营运资本周转期',name : 'SFR029',inputValue :1,checked : false})]}, 


		         ]
			},{     
		        layout : 'column',     
		        items : [{     
		            columnWidth : .5 ,
		            xtype:'label',
		            html:'<div style="font-weight:bold;font-size:14px;margin-top:10px;">盈利能力:</div>',
		        }]
			},{     
		        layout : 'column',     
		        items : [ 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '总资产回报率',name : 'SFR030',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '长期资金报酬率',name : 'SFR031',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '净资产报酬率',name : 'SFR032',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '销售毛利率',name : 'SFR083',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '销售利润率',name : 'SFR033',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '成本费用利润率',name : 'SFR034',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '资本收益率',name : 'SFR035',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '主营业务净利率',name : 'SFR036',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '折旧摊销覆盖率',name : 'SFR037',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '息税前利润率',name : 'SFR038',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '单位资产利润',name : 'SFR039',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '单位资产留存收益',name : 'SFR040',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '净资产利润率',name : 'SFR041',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '经营利润与营运资金比率',name : 'SFR042',inputValue :1,checked : false})]}, 

		         ]
			},{     
		        layout : 'column',     
		        items : [{     
		            columnWidth : .5 ,
		            xtype:'label',
		            html:'<div style="font-weight:bold;font-size:14px;margin-top:10px;">营运能力:</div>',
		        }]
			},{     
		        layout : 'column',     
		        items : [ 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '流动负债偿付比率a',name : 'SFR043',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '流动负债偿付比率b',name : 'SFR044',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '流动负债偿付比率c',name : 'SFR045',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '流动负债偿付比率d',name : 'SFR046',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '应收账款流动负债率',name : 'SFR047',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '速动资产负债率',name : 'SFR048',inputValue :1,checked : false})]}, 


		         ]
			},{     
		        layout : 'column',     
		        items : [{     
		            columnWidth : .5 ,
		            xtype:'label',
		            html:'<div style="font-weight:bold;font-size:14px;margin-top:10px;">规模指标:</div>',
		        }]
			},{     
		        layout : 'column',     
		        items : [ 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '主营业务收入净额规模',name : 'SFR049',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '资产总计规模',name : 'SFR050',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '所有者权益合计规模',name : 'SFR051',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '平均主营业务收入净额规模',name : 'SFR052',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '平均资产总计规模',name : 'SFR053',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '平均所有者权益合计规模',name : 'SFR054',inputValue :1,checked : false})]}, 

		         ]
			},{     
		        layout : 'column',     
		        items : [{     
		            columnWidth : .5 ,
		            xtype:'label',
		            html:'<div style="font-weight:bold;font-size:14px;margin-top:10px;">财务结构:</div>',
		        }]
			},{     
		        layout : 'column',     
		        items : [ 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '长期资产适合率',name : 'SFR055',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '付息债务结构比',name : 'SFR056',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '流动负债结构比',name : 'SFR057',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '应付账款负债比',name : 'SFR058',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '有形资本净值与长期负债比',name : 'SFR059',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '应收账款与总资产比率',name : 'SFR060',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '存货与总资产比率',name : 'SFR061',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '资本固定化比率',name : 'SFR062',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '财务费用占借款比率',name : 'SFR063',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '资本充足率',name : 'SFR064',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '长期资金适合率',name : 'SFR065',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '业务费用与存货比率',name : 'SFR066',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '存货与流动资产比率',name : 'SFR067',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '净资产与年末贷款余额比率',name : 'SFR068',inputValue :1,checked : false})]}, 


		         ]
			},{     
		        layout : 'column',     
		        items : [{     
		            columnWidth : .5 ,
		            xtype:'label',
		            html:'<div style="font-weight:bold;font-size:14px;margin-top:10px;">成长性:</div>',
		        }]
			},{     
		        layout : 'column',     
		        items : [ 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '主营业务收入增长率',name : 'SFR069',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '总资产增长比率',name : 'SFR070',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '资本积累率',name : 'SFR071',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '净利润增长率',name : 'SFR072',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '总负债增长率',name : 'SFR073',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '流动负债增长率',name : 'SFR074',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '长期负债增长率',name : 'SFR075',inputValue :1,checked : false})]}, 
					{columnWidth : .2,items : [new Ext.form.Checkbox({boxLabel : '主营业务经营利润增长率',name : 'SFR076',inputValue :1,checked : false})]}, 


		         ]
			},
			
			
			
			]});



		//新增用户窗口 
		addWin01 = new Ext.Window({ 
		id: 'addWinEnter', 
		title: '财务指标——企业法人', 
		width: 875, 
		height: 700, 
		//背景遮罩 
		modal: true, 
		//重置大小 
		resizable: false, 
		//当关闭按钮被点击时执行的动作 
		closeAction: 'hide', 
		plain: true, 
		buttonAlign: 'right', 
		items:addForm01, 
		buttons: 
		[  
		{ text: '确定', id: 'btnSubmit01' } ,
		{ text: '重置', id: 'btnReset01' } ,
		{ text: '取消', handler: function() { Ext.getCmp('addWinEnter').hide(); } }

		] 
		});


		//新增用户窗口 
		addWin02 = new Ext.Window({ 
		id: 'addWinPublic', 
		title: '财务指标——事业单位', 
		width: 875, 
		height: 160, 
		//背景遮罩 
		modal: true, 
		//重置大小 
		resizable: false, 
		//当关闭按钮被点击时执行的动作 
		closeAction: 'hide', 
		plain: true, 
		buttonAlign: 'right', 
		items:addForm02, 
		buttons: 
		[  
		{ text: '确定', id: 'btnSubmit02' } ,
		{ text: '重置', id: 'btnReset02' } ,
		{ text: '取消', handler: function() { Ext.getCmp('addWinPublic').hide(); } }

		] 
		});


		//新增用户窗口 
		addWin03 = new Ext.Window({ 
		id: 'addWinFinan', 
		title: '财务指标——金融同业', 
		width: 675, 
		height: 420, 
		//背景遮罩 
		modal: true, 
		//重置大小 
		resizable: false, 
		//当关闭按钮被点击时执行的动作 
		closeAction: 'hide', 
		plain: true, 
		buttonAlign: 'right', 
		items:addForm03, 
		buttons: 
		[  
		{ text: '确定', id: 'btnSubmit03' } ,
		{ text: '重置', id: 'btnReset03' } ,
		{ text: '取消', handler: function() { Ext.getCmp('addWinFinan').hide(); } }

		] 
		});

		//新增用户窗口 
		addWin04 = new Ext.Window({ 
		id: 'addWinSmall', 
		title: '财务指标——小企业法人', 
		width: 875, 
		height: 700, 
		//背景遮罩 
		modal: true, 
		//重置大小 
		resizable: false, 
		//当关闭按钮被点击时执行的动作 
		closeAction: 'hide', 
		plain: true, 
		buttonAlign: 'right', 
		items:addForm04, 
		buttons: 
		[  
		{ text: '确定', id: 'btnSubmit04' } ,
		{ text: '重置', id: 'btnReset04' } ,
		{ text: '取消', handler: function() { Ext.getCmp('addWinSmall').hide(); } }

		] 
		});

		//添加按钮单击事件 
		function btnAddClick() { 
			var custType = Ext.getCmp("custType").getValue();
			var accountMonth = Ext.getCmp("accountMonth").getValue();
			if(custType == "" || accountMonth == ""){
				Ext.MessageBox.alert("操作错误","请选择客户类型和财报月份");
			}
			else if(custType == 01){
				Ext.getCmp('addFormPublic').form.reset();
				Ext.getCmp('addFormFinan').form.reset();
				Ext.getCmp('addFormSmall').form.reset();
				
				Ext.getCmp("addWinEnter").show();
				Ext.getCmp("addWinEnter").buttons[0].handler = setColDisplay; 
				Ext.getCmp("addWinEnter").buttons[1].handler = reset; 
				
			}
			else if(custType == 02){
				Ext.getCmp('addFormEnter').form.reset();
				Ext.getCmp('addFormFinan').form.reset();
				Ext.getCmp('addFormSmall').form.reset();
				
				Ext.getCmp("addWinPublic").show();
				Ext.getCmp("addWinPublic").buttons[0].handler = setColDisplay; 
				Ext.getCmp("addWinPublic").buttons[1].handler = reset; 
				
			}
			else if(custType == 03){
				Ext.getCmp('addFormEnter').form.reset();
				Ext.getCmp('addFormPublic').form.reset();
				Ext.getCmp('addFormSmall').form.reset();
				
				Ext.getCmp("addWinFinan").show();
				Ext.getCmp("addWinFinan").buttons[0].handler = setColDisplay; 
				Ext.getCmp("addWinFinan").buttons[1].handler = reset; 
				
			}
			else if(custType == 04){
				Ext.getCmp('addFormEnter').form.reset();
				Ext.getCmp('addFormPublic').form.reset();
				Ext.getCmp('addFormFinan').form.reset();
				
				Ext.getCmp("addWinSmall").show();
				Ext.getCmp("addWinSmall").buttons[0].handler = setColDisplay; 
				Ext.getCmp("addWinSmall").buttons[1].handler = reset; 
				
			}
			


		}; 

		function reset(){
			Ext.getCmp('addFormEnter').form.reset();
			Ext.getCmp('addFormPublic').form.reset();
			Ext.getCmp('addFormFinan').form.reset();
			Ext.getCmp('addFormSmall').form.reset();
			
		};

		function setColDisplay() {
			var displayIndex = false; // 若无指标需要显示，则仍旧显示客户基本信息
			var INFOCOLS = 10;
			var ENTERCOLS = 83;
			var PUBLICCOLS = 7;
			var FINANCOLS = 21;
			var SMALLCOLS = 83;
			var spaceNums = 0;
			var count = 0;
			var MAX_NUM = 10;
			
			for(var i = 1; i <=ENTERCOLS; i++){
				var temp;
				if(i < 10) temp = addForm01.getForm().findField("FR00" + i).getValue();
				else temp = addForm01.getForm().findField("FR0" + i).getValue();
				cm1.setHidden(INFOCOLS + i ,!temp);
				if(count > MAX_NUM){
					cm1.setHidden(INFOCOLS + i ,1);
				}
				else if(temp) {
					displayIndex = true;
					count++;
				}
			}
			for(var i = 1; i <=PUBLICCOLS; i++){
				var temp;
				if(i < 10) temp = addForm02.getForm().findField("PFR00" + i).getValue();
				else temp = addForm02.getForm().findField("PFR0" + i).getValue();
				cm1.setHidden(INFOCOLS + ENTERCOLS + i ,!temp);
				if(count > MAX_NUM){
					cm1.setHidden(INFOCOLS + i ,1);
				}
				else if(temp) {
					displayIndex = true;
					count++;
				}
			}

			for(var i = 1; i <=FINANCOLS; i++){
				var temp;
				if(i < 10) temp = addForm03.getForm().findField("FFR00" + i).getValue();
				else temp = addForm03.getForm().findField("FFR0" + i).getValue();
				cm1.setHidden(INFOCOLS + ENTERCOLS + PUBLICCOLS + i ,!temp);
				if(count > MAX_NUM){
					cm1.setHidden(INFOCOLS + i ,1);
				}
				else if(temp) {
					displayIndex = true;
					count++;
				}
			}
			for(var i = 1; i <=SMALLCOLS; i++){
				if(i == 77) {//没有SFR077 
					spaceNums++;
					continue;
				}
				var temp;
				if(i < 10) temp = addForm04.getForm().findField("SFR00" + i).getValue();
				else temp = addForm04.getForm().findField("SFR0" + i).getValue();
				cm1.setHidden(INFOCOLS + ENTERCOLS + PUBLICCOLS + FINANCOLS + i - spaceNums,!temp);
				if(count > MAX_NUM){
					cm1.setHidden(INFOCOLS + i ,1);
				}
				else if(temp) {
					displayIndex = true;
					count++;
				}
			}
			
			
			
			for(var i = 4; i <= INFOCOLS; i++)
				cm1.setHidden(i ,displayIndex);
			
			if(count > MAX_NUM) Ext.MessageBox.alert("提示","最多显示10个指标列。");
			else{
				Ext.getCmp("addWinEnter").hide(); 
				Ext.getCmp("addWinPublic").hide(); 
				Ext.getCmp("addWinFinan").hide(); 
				Ext.getCmp("addWinSmall").hide(); 
			}

			
		 };

	//查找客户表单
	var form = new Ext.form.FormPanel({ 
	renderTo:'search_panel',     
	height : 160,
	width: 950,
	id: 'findForm', 
	title: '对比客户查询',
	anchor:'80%', 
	bodyStyle: 'margin:3px;text-align:left;', 
	frame: true, 
	labelWidth: 85, 
	buttonAlign:'right',
	items: 
	[ {
		layout:"column",
		items:[{
			columnWidth : .33, // 该列有整行中所占百分比
		           layout : "form",
		           items : [{
		xtype: 'combo', 
		 id : "custType",
		 store :custTypeStore,
		fieldLabel: '客户类型',
		valueField : 'code',
		displayField : 'name',
		allowBlank : false,
		typeAhead : true,
		width: 150,
		mode:'remote',  
		hiddenName:'custType',
		editable: false,
		triggerAction : 'all',
		selectOnFocus : true   
		}]},{
			columnWidth : .33, // 该列有整行中所占百分比
	           layout : "form",
	           items : [{
		           	xtype: 'datefield',
		        	id: 'accountMonth', 
		        	name: 'accountMonth', 
		        	fieldLabel: '财报月份', 
		    		allowBlank : false,
		    		typeAhead : true,
		        	editable:false, 
		    		selectOnFocus : true , 
		        	width:150 ,
		        	format : 'Y-m'  
	}]},
		{ columnWidth : .33, // 该列有整行中所占百分比
		    layout : "form",
		    items : [{
		    	xtype: 'combo', 
				 id : "custScope",
				 store :custScopeStore,
				fieldLabel: '客户规模',
				valueField : 'code',
				displayField : 'name',
				allowBlank : true,
				typeAhead : true,
				width: 150,
				mode:'remote',  
				hiddenName:'custScope',
				editable: false,
				triggerAction : 'all',
				selectOnFocus : true
		}]} 
		]},
	{
		layout:"column",
	items:[{
		columnWidth : .33, // 该列有整行中所占百分比
	           layout : "form",
	           items : [{
	        	   xtype: 'combo', 
			 		id : "IndustryTypeLevelOne",
			       store :addIndustryTypeLevelOneStore,
			       fieldLabel: '行业大类',
			       valueField : 'code',
			       displayField : 'name',
			       typeAhead : true,
			       width: 150,
			       mode:'remote', 
			       editable: false,
			       triggerAction : 'all',
			       selectOnFocus : true,
			       hiddenName:'industryTypeLevelOne' ,
			       listeners:{
			           select : function(combo, record,index)   
			           {
						var industryTypeLevelTwoCombo = Ext.getCmp('IndustryTypeLevelTwo');
						industryTypeLevelTwoCombo.clearValue(); //可以实现当下拉值变更时，清空之前下拉选项中的值   
						addIndustryTypeLevelTwoStore.proxy =new Ext.data.HttpProxy({
						url:'showIndustryTypeLevelTwo.do?LevelOneId='+combo.value,
						method:'GET'
						}); 
						addIndustryTypeLevelTwoStore.load(); //加载下拉框的store      
			           }      
			       }
	}]},{ columnWidth : .33, // 该列有整行中所占百分比
        layout : "form",
        items : [{
        	xtype: 'combo', 
	 		id : "IndustryTypeLevelTwo",
	       store :addIndustryTypeLevelTwoStore,
	       fieldLabel: '行业子类',
	       valueField : 'code',
	       displayField : 'name',
	       typeAhead : true,
	       width: 150,
	       mode:'remote', 
	       editable: false,
	       triggerAction : 'all',
	       selectOnFocus : true,
	       hiddenName:'industryTypeLevelTwo' 
      
}]},{ columnWidth : .33, // 该列有整行中所占百分比
	           layout : "form",
	           items : [{xtype: 'combo',
					id: 'orgCode',
					//name: 'exposureType', 
					fieldLabel: '所属机构', 
					store:new Ext.data.SimpleStore({fields:['id', 'text'],data:[[]]}), 
					displayField: 'text',
					valueField: 'id',
					hiddenName: 'orgCode',
		            editable:false, 
		            mode: 'local', 
		            triggerAction:'all', 
		            frame:true,
		            border:true,
		            width:150,
		            tpl: '<div id="treePanel" style="height:180px;width:240px;"></div>', //html代码      
		            resizable:true
	        	       
	}]} 
	]},
	{
		layout:"column",
	items:[{
		columnWidth : .33, // 该列有整行中所占百分比
	           layout : "form",
	           items : [{
			xtype: 'combo', 
			 id : "pdValue",
			 store :pdValueStore,
			fieldLabel: '信用等级',
			valueField : 'code',
			displayField : 'code',
			allowBlank : true,
			typeAhead : true,
			width: 150,
			mode:'remote',  
			hiddenName:'pdValue',
			editable: false,
			triggerAction : 'all',
			selectOnFocus : true   
	}]},{ columnWidth : .33, // 该列有整行中所占百分比
	           layout : "form",
	           items : [{
	        	   xtype: 'combo', 
	        	   id : "exposureType",
	        	   store :exposureTypeStore,
	        	  fieldLabel: '风险暴露分类',
	        	  valueField : 'code',
	        	  displayField : 'name',
	        	  allowBlank : true,
	        	  typeAhead : true,
	        	  width: 150,
	        	  mode:'remote',  
	        	  hiddenName:'exposureType',
	        	  editable: false,
	        	  triggerAction : 'all',
	        	  selectOnFocus : true
	}]},{ columnWidth : .33, // 该列有整行中所占百分比
        layout : "form",
        items : [{
     	   xtype: 'combo',
			id: 'defaultStat',
			//name: 'exposureType', 
			fieldLabel: '违约状态',
     	   store :defaultStatStore, 
      	  valueField : 'code',
    	  displayField : 'name',
    	  allowBlank : true,
    	  typeAhead : true,
    	  width: 150,
    	  mode:'remote',  
    	  hiddenName:'defaultStat',
    	  editable: false,
    	  triggerAction : 'all',
    	  selectOnFocus : true
}]} 
	]},{
		layout:"column",
		items:[{
			columnWidth : .5, // 该列有整行中所占百分比
		           layout : "form",
		           items : [{
//		        	   xtype: 'button',
//						id: 'btnAdd', 
//						name: 'btnAdd', 
//						text: '选择需要显示的财务指标列',
//						width:150 ,
//						handler: btnAddClick	
		}]} 
		]},
	],
	buttons:[{text:"查询", handler: findCustomer},
	         {text:"重置", handler: function(){ 
				var custType = Ext.getCmp('custType').getValue();
				Ext.getCmp('findForm').form.reset();
				Ext.getCmp('custType').setValue(custType);
			}},
			{text:"选择需要显示的财务指标列", handler: btnAddClick}]
	});

	var tree = new Ext.tree.TreePanel
	({ 
	    animate:true,
	    titleCollapse:true,
	    root:root,
	    singleExpand:false,
	    iconCls:"icon-tree",
	    autoLoad:false,
	    allowDomMove:true,
	    frame:true,
	    collapsible:false,
	    collapsed:false,
	    collapseFirst:true,
	    border:false,
	    listeners:{ 
	    	render:function(tree){ 
	    		tree.el.on('click',function(e){ 
				e.stopPropagation(); }) ;
			} 
		} 
	});

	var loader=new Ext.tree.TreeLoader({dataUrl:'system/showOrgTree.do'});

	var root=new Ext.tree.AsyncTreeNode
	({
	 id:"0", 
	 leaf:false,
	 loader: loader,
	 text:"清远农商行总行",
	 expandable:true,
	 expanded:true 
	});         

	tree.setRootNode(root);

	var comboTree =  Ext.getCmp('orgCode');      
	var orgCode = "";
	comboTree.on('expand',function(){tree.render('treePanel');});

	var tree_click = function(node,e)
	{
		 e.stopEvent();   //非叶子节点则不触发
	     comboTree.setValue(node.id);  //设置option值
	     comboTree.setRawValue(node.text);
	     //comboTree.hiddenField.value = node.id;  
	 	comboTree.collapse();   //隐藏option列表
//	 	alert(comboTree.value);
//	 	alert(comboTree.getValue());
//	 	alert(comboTree.getRawValue());
//	 	alert(comboTree.value);
	 	orgCode = comboTree.value;
	};
	tree.on("click",tree_click);  

	//表单验证-都为空
	Ext.apply(Ext.form.VTypes,   
	{
	 allNull: function(val, field){
	 if(field.allNull){
	 	var custTypeId = field.allNull.custType;
	 	this.custTypeField = Ext.getCmp(custTypeId);
	 	var custNameId = field.allNull.custName;
	 	this.custNameField = Ext.getCmp(custNameId);
	 	var orgId = field.allNull.organizationID;
	 	this.orgIdField = Ext.getCmp(orgId);
	 	var blId = field.allNull.busiLicenseID;
	 	this.blIdField = Ext.getCmp(blId);
	 	
	 	var custTypeValue = this.custTypeField.getValue();
	 	var custNameValue = this.custNameField.getValue();
	 	var orgIdValue = this.orgIdField.getValue();
	 	var blIdValue = this.blIdField.getValue();
	 } 
	 if(custTypeValue==null&&custNameValue==null&&orgIdValue==null&&blIdValue==null){
	 	Ext.MessageBox.show({
	                     title: '提示',
	                     msg: '请输入至少一项查询条件！',
	                     buttons: Ext.Msg.OK
	                });
	 	return false;
	 }
	 else{
	 	return true;
	 }
	 }
	});

	//查询客户 
	function findCustomer() { 
		var findForm = Ext.getCmp("findForm");
		
		if(findForm.form.isValid()){
			
			findForm.form.doAction('submit', { 
	                    url : 'finance/findPeerComparation.do?orgCode='+orgCode,
	                    method : 'post', 
	                    success : function(form,action) { 
	                    var resultCust = Ext.util.JSON.decode(action.response.responseText).result;
	                    
	                    if(JSON.stringify(resultCust)!='[]'){
	                    ds.proxy = new Ext.data.MemoryProxy(resultCust);
						ds.load({params:{start:0,limit:20}});
						}
						else{
						ds.proxy = new Ext.data.MemoryProxy(resultCust);
						ds.load();
						Ext.Msg.alert('提示', '当前客户不存在！');}
	                    }, 
	                        failure : function() { 
							Ext.Msg.alert('提示', '请求异常，请重新查询！'); 
						} 
	                    }); 
	}
	} 
	function exportExcel(){
		var s = '';
		var colNum = cm1.getColumnCount();
		for(var i = 4; i < colNum; i++){
			if(!cm1.isHidden(i)){
				s += cm1.getDataIndex(i)+'-';
			}
		}
		window.location.href='finance/exportExcel.do?colId='+s;
	};

})